package pl.edu.agh.lab2.sr.remoteInterfaces;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;

import pl.edu.agh.lab2.sr.beans.IPlayer;
import pl.edu.agh.lab2.sr.beans.InvalidGameStateException;
import pl.edu.agh.lab2.sr.beans.InvalidUserException;

public interface IGameServer extends Remote {

	void register(IPlayer player, IServerListener listener)
			throws RemoteException, InvalidUserException;

	List<String> getRegisteredPlayers() throws RemoteException;

	IBattleshipGame createBattleshipGame(IPlayer player1,
			IServerListener listener, boolean withBot) throws RemoteException,
			InvalidUserException, InvalidGameStateException;

	List<String> getGamesList() throws RemoteException;

	IBattleshipGame join(IPlayer player, IServerListener listener, int gameId)
			throws RemoteException, InvalidUserException,
			IllegalArgumentException, InvalidGameStateException;

	void quit(IPlayer player, IServerListener listener) throws RemoteException,
			InvalidUserException;

}
